﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;

using PluginAPI;

namespace DemoPlugin
{
    /// <summary>
    /// 插件演示
    /// </summary>
    public class Demo : IPlugin
    {        
        /// <summary>
        /// 作者
        /// </summary>
        public string Author
        {
            get
            {
                return "王亚";
            }
        }

        /// <summary>
        /// 宿主
        /// </summary>
        public IApplication application
        {
            get;
            set;
        }

        /// <summary>
        /// 加载插件
        /// </summary>
        public void Load()
        {
            MessageBox.Show("恭喜你！我是插件，已经加载成功！\n接下来我将访问宿主程序的版本号....", "");
            MessageBox.Show("宿主版本号:" + application.GetVersion(), "");
        }

        /// <summary>
        /// 卸载插件
        /// </summary>
        public void UnLoad()
        {
            MessageBox.Show("恭喜你！我是插件，已经卸载成功！", "");
        }
    }
}
